package org.osiris.persistence.controllers;

import java.util.List;

import javax.persistence.EntityManager;

import org.osiris.persistence.Categoria;
import org.osiris.persistence.controllers.exceptions.IllegalOrphanException;
import org.osiris.persistence.controllers.exceptions.NonexistentEntityException;
import org.osiris.persistence.controllers.exceptions.PreexistingEntityException;

public interface CategoriasInterface {

	public abstract EntityManager getEntityManager();

	public abstract void create(Categoria categoria)
			throws PreexistingEntityException, Exception;

	public abstract void edit(Categoria categoria)
			throws IllegalOrphanException, NonexistentEntityException,
			Exception;

	public abstract void destroy(Long id) throws IllegalOrphanException,
			NonexistentEntityException;

	public abstract List<Categoria> findCategoriaEntities();

	public abstract List<Categoria> findCategoriaEntities(int maxResults,
			int firstResult);

	public abstract Categoria findCategoria(Long id);

	public abstract int getCategoriaCount();

}